<?php
class Tv_Arte_Tree_Std_Data implements Tv_Arte_Tree_IComponentData
{
    /**
     * $_data
     * @var Array
     */
    private $_data = Array();
    /**
     * $_depth
     * @var Integer
     */
    private $_depth = 0;
    public function __construct(Array $data)
    {
        $this->_data = $data;
        $this->checkData();
    }
    public function checkData()
    {
        if (!isset($this->_data['id'])) {
            throw new BSCore_Tree_Exception('id');
        }
        if (!isset($this->_data['parent_id'])) {
            throw new BSCore_Tree_Exception('parent_id');
        }
    }
    public function getId()
    {
        return $this->_data['id'];
    }
    public function getParentId()
    {
        return $this->_data['parent_id'];
    }
    public function getDepth()
    {
        return $this->_depth;
    }
    public function setDepth($value)
    {
        $this->_depth = $value;
    }
    public function getData()
    {
        return $this->_data;
    }
}